<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
    <head>
        <th:block th:include="include :: header('新增具体流程')" />
    </head>
    <body class="white-bg">
        <div class="wrapper wrapper-content animated fadeInRight ibox-content">
            <form class="form-horizontal m" id="form-detail-add">
                <div class="form-group">
                    <label class="col-sm-3 control-label">名称：</label>
                    <div class="col-sm-8">
                        <input name="name" class="form-control" type="text" autocomplete="off" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">流程类型：</label>
                    <div class="col-sm-8">
                        <select name="flowCategory.id" id="flowCategoryName" class="form-control" required>
                            <option value="">-请选择-</option>
                            <option th:each="flowCategory : ${flowCategoryList}" th:text="${flowCategory.name}" th:value="${flowCategory.id}"></option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">需要几层审核：</label>
                    <div class="col-sm-8">
                        <input name="tierCheck" class="form-control" type="text" autocomplete="off" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">开始天数：</label>
                    <div class="col-sm-8">
                        <input name="beginDays" class="form-control" type="text" autocomplete="off" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">结束天数：</label>
                    <div class="col-sm-8">
                        <input name="finishDays" class="form-control" autocomplete="off" type="text">
                    </div>
                </div>
            </form>
        </div>
        <th:block th:include="include :: footer" />
        <script th:inline="javascript">
            var prefix = ctx + "oa/detail"
            $("#form-detail-add").validate({
                focusCleanup: true
            });

            function submitHandler() {
                if ($.validate.form()) {
                    $.operate.save(prefix + "/add", $('#form-detail-add').serialize());
                }
            }
        </script>
    </body>
</html>